🌐 HTTP Status Codes Explained

When you visit a website, your browser and the server communicate using the HTTP protocol.
Every request sent to the server returns a status code — a three-digit number that tells your browser what happened.

These codes are grouped into five categories:


1xx – Informational Responses

These indicate that the request was received and understood, but the process is continuing.

CodeMeaning
100 ContinueThe server received the request headers and the client should proceed to send the body.
101 Switching ProtocolsThe requester asked to switch protocols, and the server agreed.
102 ProcessingThe server is still processing the request (used in WebDAV).
103 Early HintsUsed to preload resources while the server prepares the final response.

2xx – Success

These mean the request was successfully received, understood, and accepted.

CodeMeaning
200 OKThe request succeeded — the standard success response.
201 CreatedA new resource was successfully created.
202 AcceptedThe request was accepted for processing but not completed yet.
203 Non-Authoritative InformationReturned metadata differs from the origin server’s copy.
204 No ContentThe request succeeded, but there’s no response body.
205 Reset ContentTells the client to reset the document view.
206 Partial ContentOnly part of the resource is being sent (for range requests).
207 Multi-StatusMultiple results returned (used in WebDAV).
208 Already ReportedAvoids reporting the same element multiple times (WebDAV).
226 IM UsedThe server fulfilled a GET request with instance manipulations applied.

3xx – Redirection

These tell the browser that it must take additional action to complete the request.

CodeMeaning
300 Multiple ChoicesMultiple options available for the resource.
301 Moved PermanentlyThe resource has been permanently moved to a new URL.
302 FoundThe resource is temporarily available at another URL.
303 See OtherDirects to another URL (typically after a POST).
304 Not ModifiedResource hasn’t changed since last requested (used for caching).
305 Use ProxyDeprecated; indicated resource must be accessed via a proxy.
307 Temporary RedirectTemporary redirect — method unchanged.
308 Permanent RedirectPermanent redirect — method unchanged.

4xx – Client Errors

These indicate a problem with the client’s request (e.g., bad syntax, unauthorized access).

CodeMeaning
400 Bad RequestThe server couldn’t understand the request.
401 UnauthorizedAuthentication required or failed.
402 Payment RequiredReserved for future use (often used for paywalls).
403 ForbiddenThe server understood the request but refuses to authorize it.
404 Not FoundThe requested resource doesn’t exist.
405 Method Not AllowedHTTP method not supported for this resource.
406 Not AcceptableThe requested content type isn’t supported.
407 Proxy Authentication RequiredClient must authenticate with a proxy.
408 Request TimeoutThe client took too long to send a request.
409 ConflictThe request conflicts with current server state.
410 GoneThe resource has been permanently removed.
411 Length RequiredContent-Length header is missing.
412 Precondition FailedPreconditions in request headers failed.
413 Payload Too LargeRequest body is too large.
414 URI Too LongThe request URI is too long to process.
415 Unsupported Media TypeMedia type is not supported.
416 Range Not SatisfiableRequested range can’t be fulfilled.
417 Expectation FailedThe server can’t meet the “Expect” header requirements.
418 I’m a TeapotApril Fool’s joke from RFC 2324 (Hyper Text Coffee Pot Control Protocol ☕).
421 Misdirected RequestThe request was sent to the wrong server.
422 Unprocessable ContentWell-formed request but semantic errors.
423 LockedResource is locked (WebDAV).
424 Failed DependencyRequest failed due to previous failure (WebDAV).
425 Too EarlyRequest too early to be processed safely.
426 Upgrade RequiredClient should switch to a different protocol.
428 Precondition RequiredThe server requires conditional requests.
429 Too Many RequestsClient sent too many requests (rate limiting).
431 Request Header Fields Too LargeHeaders are too large.
451 Unavailable For Legal ReasonsBlocked due to legal restrictions.

5xx – Server Errors

These indicate that the server failed to fulfill a valid request.

CodeMeaning
500 Internal Server ErrorA generic error message for unexpected failures.
501 Not ImplementedThe server doesn’t support the requested functionality.
502 Bad GatewayReceived an invalid response from the upstream server.
503 Service UnavailableThe server is temporarily overloaded or under maintenance.
504 Gateway TimeoutThe upstream server didn’t respond in time.
505 HTTP Version Not SupportedThe HTTP version is not supported.
506 Variant Also NegotiatesContent negotiation configuration error.
507 Insufficient StorageThe server has insufficient storage to complete the request.
508 Loop DetectedInfinite loop detected in processing (WebDAV).
510 Not ExtendedFurther extensions to the request are required.
511 Network Authentication RequiredClient must authenticate to gain network access.

✅ Summary

  • 1xx – Informational
  • 2xx – Success
  • 3xx – Redirection
  • 4xx – Client Errors
  • 5xx – Server Errors

Understanding these codes helps developers troubleshoot issues, optimize performance, and improve user experience.